package com.zhuang.interpreter;

/**
 * @Classname Value
 * @Description 终结符表达式角色
 * @Date 2021/3/31 9:48
 * @Created by dell
 */

public class Value extends AbstractExpression {

    private int value;

    public Value(int value) {
        this.value = value;
    }

    @Override
    public int interpret(Context context) {
        return value;
    }

    @Override
    public String toString() {
        return new Integer(value).toString();
    }
}
